package com.dingding.service.user.facade;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dingding.facade.user.dto.GetUserAttachedDTO;
import com.dingding.facade.user.service.IUserAttachedFacade;
import com.dingding.service.user.core.biz.IUserAttachedService;
import com.dingding.service.user.core.dao.IUserAttachedDao;

/**
 * 
 * @ClassName: IUserAttachedService 
 * @Description: 用户附属属性服务接口
 * @author CHEHAUNBO 
 * @date 2016年4月1日 下午4:16:10
 * 
 */
@Component("userAttachedFacade")
public class UserAttachedFacade implements IUserAttachedFacade {

	@Resource(name = "userAttachedService")
	private IUserAttachedService userAttachedService;

	@Resource(name = "userAttachedDao")
	private IUserAttachedDao userAttachedDao;

	/**
	 * 
	 * @Title: isAttendActivity 
	 * @Description: 当日是否已经签到
	 * @param userAttachedDTO 数据传输DTO
	 * @return int 1 没有参加 2 已经参加
	 * @author CHEHAUNBO
	 * 
	 */
	@Override
	public int isAttendActivity(GetUserAttachedDTO userAttachedDTO) {
		return userAttachedService.getUserAttached(userAttachedDTO);
	}

	/**
	 * 
	 * @Title: updateAttendActivity 
	 * @Description:签到
	 * @return boolean  true 签到成功 false 签到失败
	 * @author CHEHAUNBO
	 * 
	 */
	@Override
	public boolean attendActivity(GetUserAttachedDTO userAttachedDTO) {

		return userAttachedService.attendActivity(userAttachedDTO);

	}

	/**
	 * @Title: resetAttendActivity
	 * @Description: 重置签到
	 * @author yuHaiQing
	 * @return boolean  true 重置签到成功 false 重置签到失败
	 */
	@Override
	public boolean resetAttendActivity() {

		return userAttachedService.resetAttendActivity();

	}

}
